package com.zcx.qshop.conn;

import org.json.JSONObject;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

@HttpInlet(Conn.INTEL_JSON_REGIST)
public class JsonRegistAsyGet extends QSAsyGet<String> {
	
	public String mobile, password;

	public JsonRegistAsyGet(String mobile, String password, AsyCallBack<String> asyCallBack) {

		super(asyCallBack);
		
		this.mobile = mobile;
		
		this.password = password;
		
 	}
 
	@Override
	public String parser(JSONObject object) {
		
		if(object.optString("message").equals("1")){

			TOAST = "注册成功";
			
			return object.optString("uid");
			
		}else if(object.optString("message").equals("2")){

			TOAST = "此用户已被注册";

			return null;

		}

		TOAST = "注册失败";
		
 		return null;

	}

}
